feat: Complete STRIDE validation and Docker persistence improvements#38
Merged
feat: Complete STRIDE validation and Docker persistence improvements#38
Conversation
✨ STRIDE Category Validation: - Add stride_validator.py with normalize_stride_category function - Implement STRIDE validation in API endpoints (manual + AI threats) - Add validation in CRUD operations for threat updates - Ensure data consistency across all threat creation/update paths 🐛 API Cleanup: - Remove duplicate imports in api.py - Fix indentation issues - Remove obsolete commented code - Organize imports by category (stdlib, third-party, local) 🗂️ File Management Improvements: - Implement UUID-based filenames for uploaded diagrams - Add file extension validation for security - Return both base64 and saved filename from save_image() - Prevent filename collisions and security issues 🐳 Docker Persistence: - Add diagrams_data volume for persistent diagram storage - Configure nginx to serve diagrams directly from volume - Fix diagram loss on container restart/rebuild - Remove obsolete docker-compose version attribute 🎨 Frontend Enhancements: - Implement compact STRIDE dropdown (shows first letter only) - Add ResidualRiskSelector pattern for better UX - Maintain consistent STRIDE categories between frontend/backend 🛡️ Security & Consistency: - All STRIDE categories normalized to standard format - Case-insensitive validation with fallback to 'Spoofing' - File type validation prevents malicious uploads - Centralized validation logic in stride_validator module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✨ STRIDE Category Validation:
🐛 API Cleanup:
🗂️ File Management Improvements:
🐳 Docker Persistence:
🎨 Frontend Enhancements:
🛡️ Security & Consistency: